﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Alos.Entity;
using Alos.Common;
using Alos.IRepository;
using Alos.IService;

namespace Alos.Service
{
  public  class SitPosSettingService: BaseService<SitPosSetting>, ISitPosSettingService
    {
       ISitPosSettingRepository SitPosSettingRepository;
       public SitPosSettingService(ISitPosSettingRepository _SitPosSettingRepository)
        {
            SitPosSettingRepository = _SitPosSettingRepository;
        }
        /// <summary>
        /// 根据老师ID和班级ID获取学生座位顺序
        /// </summary>
        /// <param name="TeacherId">老师ID</param>
        /// /// <param name="classid">班级ID</param>
        /// <returns></returns>
       public SitPosSetting GetSitPosSetting(int TeacherId, int classid)
       {
          return SitPosSettingRepository.GetSitPosSetting(TeacherId, classid);
       }
      /// <summary>
        /// 根据老师ID和班级ID修改学生座位顺序
        /// </summary>
        /// <param name="TeacherId">老师ID</param>
        /// <param name="classid">班级ID</param>
        /// <param name="colnum">有几列</param>
        /// <param name="stus">学生ID以,分割</param>
        /// <returns></returns>
       public bool UpdateSitPosSetting(int TeacherId, int classid, int colnum, string stus)
       {
           return SitPosSettingRepository.UpdateSitPosSetting(TeacherId, classid, colnum, stus);
       }
    }
}
